<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:c="http://java.sun.com/jstl/core">
<ui:composition template="/templates/mainTemplate.xhtml">
	<ui:define name="pageTitle"> ${msg.userHome}</ui:define>
	<ui:define name="pageHeader"> ${msg.userHome}</ui:define>
	<ui:define name="maincontent">
		<h:form>
			<h:commandButton value="Alle meine Bilder anzeigen"
				action="#{searchBean.loadAllPictures}">
			</h:commandButton>
		</h:form>

		<t:dataTable var="allPictures" value="#{searchBean.allMyPictures}"
			forceId="true" preserveDataModel="true"
			border="1">
			<t:column>
				<f:facet name="header">
					<h:outputText value="Thumbnail" />
				</f:facet>
				<t:graphicImage value="#{allPictures.path}" />
			</t:column>
			<t:column>
				<f:facet name="header">
					<h:outputText value="Name" />
				</f:facet>
				<h:form>
					<h:commandLink forceId="true" action="#{image.showDetails}"
						immediate="true">
						<t:outputLabel value="#{allPictures.name}" />
						<f:param name="imageDetailInfo" value="#{allPictures.name}" />
					</h:commandLink>
				</h:form>
			</t:column>
			<t:column>
				<f:facet name="header">
					<h:outputText value="Filename" />
				</f:facet>
				<t:outputLabel value="#{allPictures.filename}" />
			</t:column>
			<t:column>
				<f:facet name="header">
					<h:outputText value="Datum" />
				</f:facet>
				<t:outputLabel value="#{allPictures.date}" />
			</t:column>
		</t:dataTable>
	</ui:define>
</ui:composition>
</html>